<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>使用flask_wtf验证上传的文件</title>
</head>
<body>
    <h3>使用flask_wtf验证上传的文件</h3>
    <form action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
        <table>
            <tbody>
                <tr>
                    <td>上传头像</td>
                    <td><input type="file" name="avatar"></td>
                </tr>
                <tr>
                    <td>用户昵称</td>
                    <td><input type="text" name="username"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><button type="submit">提交</button></td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>